#include "gui/layers/Layer.h"

namespace gui {

Layer::Layer() {
	this->completeSurface = NULL;
}

Layer::~Layer() {
	if (this->completeSurface != NULL) delete this->completeSurface;
}

Surface* Layer::getPortion(Portion portion) {
	return this->completeSurface->crop(portion);
}

Portion Layer::getOffset() {
	Portion p = {this->completeSurface->getLeftmost(), this->completeSurface->getTopmost(), this->completeSurface->getWidth(), this->completeSurface->getHeight()};
	return p;
}
}
